import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf


# name属性用于给OP起名字
# 如果两个起了一样的名字，则会按顺序在名字后面添加标识符
a = tf.constant(4, name="con")
b = tf.constant(8, name="con")

c = tf.add(a, b, name="add_a_b")

with tf.Session() as sess:
    sum_c = sess.run(c)
    file_writer = tf.summary.FileWriter("./tmp/summary/", graph=sess.graph)


